It is known in the art for a software application to employ services and/or methods to carry out functions useful to the application. In many cases, the services or methods reside on the same computer as the application, and are therefore readily accessible. However, it is known to make service methods resident on a server available to client applications.
In one example, an application on a first computer may employ a server method in order to subscribe to updates to a certain variable that is maintained by other software on a server computer. Such an application may be used in a building control system, for example, a heating, ventilation and air conditioning (“HVAC”) system. In one example, a client computer can subscribe to alarm information that is maintained on a server computer. In HVAC and other building control systems, alarms can be generated when one or more devices malfunctions, or if the system cannot heat or cool portions of the building as requested.
Further to this example, a user at a computer station may desire to obtain notification of any new alarms from a server computer that maintains alarms in the system. In such a case, the client application invokes a service on the server computer that provides alarm status updates to the first (client) computer as they occur.
To provide ongoing updates, the client/server relationship must generally be a so-called “full trust” relationship. In other words, communications between the server and the client must occur without firewall protection. Suitable “full trust” environments can be configured in a local area network (“LAN”) or virtual private network (“VPN”), among other ways. Forms of “partial trust” may also be used. In such environments, the service methods or processes on the server computer are extensions of the available library of functions available to the client, and can provide rich levels of service.
Thus, for example, in a full trust environment, service methods and processes that provide data updates and other similar objects employ full duplex communications. In duplex communications, the service object may communicate updates to the client application as they occur.
By contrast, some connections, for example, World Wide Web connections, between a client computer and a server computer are subject to firewall protections. More specifically, communication over the web using an ordinary web browser occur through a firewall, and have limited functional connectivity. Such communication is carried out using the hypertext transfer protocol (“http”). In general, a web client formulates an http request, and the web browser provides a context reply. The web client awaits the reply. However, once the reply is received, the web client does not accept additional replies to the initial request. Accordingly, attempting to subscribe to a service method or process that provides multiple subsequent updates cannot be readily accomplished using http requests in firewalled web environment.
As a consequence, there are limitations to connections via the web that are not present in LAN, VPN and other non-firewalled environments.
However, it is still possible to use web connections to request a server for multiple updates to a variable or file using polling techniques. In particular, to provide the ability to obtain updates in an Internet (firewall) environmental, it is known to provide the web client with a polling function that automatically renews requests for values from a server. For example, if the web client desires updates to an alarm status, the web client periodically reissues requests for any new alarm status. This practice is known as polling. If the web client issues a polling request every minute, then the alarm status is updated in the web client every minute.
The downside to the polling practice of the prior art is that it has inefficiencies. In particular, if there are no updates to the data of interest for long periods of time, then the web client issues many polling requests that return no data of interest. This unnecessarily employs resources related to issuing an http request, as well as generating the context reply in the server. However, using a low frequency of polling requests can result in delayed updates, and thus reduce the responsiveness of the application.
Accordingly, there is a need to improve efficiency in communications between a web client and a web service, particularly when the web client subscribes to receive periodic update of values from the web service to be initiated by the web service.